package com.arpa.wms.mapper;

import com.arpa.wms.domain.dto.SupplierDTO;
import com.arpa.wms.domain.entity.Supplier;
import com.arpa.wms.domain.vo.SupplierVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 供应商 Mapper 接口
 * </p>
 *
 * @author LEO
 * @since 2020-09-04
 */
public interface SupplierMapper extends BaseMapper<Supplier> {

    /**
     * 查询列表
     * @param supplierDTO
     * @param eq
     * @return
     */
    List<SupplierVO> queryList(SupplierDTO supplierDTO);
    /**
     * 查询列表
     * @param supplierDTO
     * @param eq
     * @return
     */
    List<SupplierVO> queryLists(SupplierDTO supplierDTO, LambdaQueryWrapper<SupplierDTO> eq);
     /**
      *  @author: Allen chen
      *  @Date: 2020/9/8 14:41
      *  @Description: 根据名称和编号查询
      */
    List<SupplierVO> queryByNameOrCode(SupplierDTO supplierDTO);

    /**
     * 查询合计,包含总数
     * @param supplierDTO
     * @return
     */
    SupplierVO queryListSum(SupplierDTO supplierDTO);

    int batchDelete(@Param("list") List<String> list , @Param("modifiedBy") String modifiedBy);
}
